@import '@/app/styles/variables';

.card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  align-self: stretch;
}

.link {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;

  &:hover {
    .title {
      color: #337cec;
    }
    .image img {
      transform: scale(1.1);
    }
  }
}

.image {
  position: relative;
  cursor: pointer;
  aspect-ratio: 453.33 / 256;

  flex-shrink: 0;
  align-self: stretch;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  img {
    object-position: center center;
    object-fit: cover;
    border-radius: inherit;
    transition: $transition-default;
  }
}

.badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.title {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;

  overflow: hidden;
  color: #000;
  width: 100%;
  word-break: break-word;

  min-height: 26px;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 26px; /* 130% */
  transition: $transition-default;
}

.date {
  overflow: hidden;
  color: #ababab;
  width: 100%;

  min-height: 22px;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px; /* 137.5% */
  max-width: 222px;
}

@include media(sm) {
  .card {
    gap: 4px;
  }
  .link {
    gap: 12px;
  }
  .image {
    //max-height: 192px;
    border-radius: 16px;
  }
  .badge {
    bottom: 8px;
    right: 8px;
  }
  .title {
    border-radius: 4px;
    min-height: 22px;
    font-size: 16px;
    line-height: 22px; /* 137.5% */
  }
  .date {
    border-radius: 4px;
    min-height: 20px;
    font-size: 14px;
    line-height: 20px; /* 142.857% */
    max-width: 112px;
  }
}
